import React, { Component } from 'react'
import RouterView from '../../router/routerView'
import { RouterItem } from "../../type/router"
import { Tabbar } from 'react-vant';
import { FriendsO, HomeO, Search, SettingO } from '@react-vant/icons';
import { NavLink } from 'react-router-dom'
interface IPROPS {
  children: RouterItem[]
}
class Index extends Component<IPROPS>{
  render() {
    const { children } = this.props
    return (
      <div>
        <div>
          <RouterView routes={children}></RouterView>
        </div>
        <div className='demo-tabbar'>
          <Tabbar>
            <Tabbar.Item icon={<HomeO />}>
              <NavLink to="/index/shou">首页</NavLink>
            </Tabbar.Item>
            <Tabbar.Item icon={<Search />}>
              <NavLink to="/index/class">分类</NavLink>
            </Tabbar.Item>
            <Tabbar.Item icon={<FriendsO />}>
              <NavLink to="/index/my">我的</NavLink>
            </Tabbar.Item>

          </Tabbar>
        </div>
      </div>
    )
  }
}
export default Index